﻿CREATE TABLE [dbo].[User]
(
	[Id] BIGINT NOT NULL PRIMARY KEY IDENTITY(1,1), 
	[Email] NVARCHAR(255) NOT NULL,
	[Password] NVARCHAR(255) NOT NULL, 
	[Nickname] NVARCHAR(50) NOT NULL, 
    [InvalidAttempts] INT NOT NULL DEFAULT(0),
	CONSTRAINT [UQ_User_Email] UNIQUE ([Email]),
	CONSTRAINT [CK_User_InvalidAttempts] CHECK ([InvalidAttempts] >= 0)
)
